package cn.zbmao.web.Timer;

import org.apache.log4j.Logger;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

public class CrmTaskerListener implements ServletContextListener {
	  private static Logger log= Logger.getLogger(CrmTaskerListener.class);

//    程序启动后开始监听
	@Override
	public void contextDestroyed(ServletContextEvent arg0) {
		log.info("==================销毁了=====================");
		TimerManager.cancel();

	}

	@Override
	public void contextInitialized(ServletContextEvent arg0) {
		log.info("++++++++++++++++++++我开始监听了++++++++++++++++++++++++");
		new TimerManager();
	}

}
